package CLIENT;


/**
 *
 * @author win
 */
import java.io.*;
/**
 * This class represents a message that sends in the Talk2Me program
 * it contains a string message , source and dest for the message and a boolean declares if it's a system message or a chat message
 * @author Yaniv Kalif
 */
public class Message implements Serializable
{
   private String _msg;
   private String _src = null;
   private String _dst = null; 
   private boolean _isSystemMessage; 

   public Message(String msg,String src)
   {
      _msg=msg;
      _src=src;
   }
   /**
    * Get method 
    * @return the message string (The actual message)
    */
    public String GetString(){return _msg;}  
   /**
    * This methos sets the source of the Message 
    * @param src - The new source for the message
    */
    public void SetClientsrc(String src){_src = src;}
     /**
    * This methos sets the Destination of the Message 
    * @param src - The new Destination for the message
    */
    public void SetClientdst(String dst){_dst = dst;}
    /**
     * Get method
     * @return The source of the message
     */
    public String GetClientsrc(){return _src;}
    /**
     * Get method
     * @return The Destination of the message
     */
    public String GetClientdst(){return _dst;}
    /**
     * This method sets the Message to be a system message or a regular message
     * @param bool - the new value of _IsSystemMessage
     */
    public void SetisSystemMessage(boolean bool){ _isSystemMessage = bool;}
    /**
     * Get method
     * @return The value of _IsSystemMessage ==> returns if it's a system Message or a regular Message
     */
    public boolean GetisSystemMessage(){return _isSystemMessage;}

}